Getting Tracks
There are two functions to get tracks from the Inference Store.
The function filter_tracks
allows you to provide a collection of filters to query tracks. This structure allows users to perform precise filtering on historical or current track data based on a variety of criteria, such as temporal constraints, life cycle metrics, and geolocation. The optional filters are described below:
-
time_window_filter
Filters tracks whose associated inferences fall within a specific time window. Useful for querying tracks active during a given period (e.g., last 10 minutes, between two time stamps). -
sequence_number_filter
Filters tracks based on their sequence number (e.g., frame number). Allows querying tracks that were updated during a specific logical segment of a data stream. -
lifetime_filter
Filters tracks by their total lifetime, measured in number of updates. Useful to isolate short-lived or long-lived tracks. -
consecutive_updates_filter
Filters tracks by the number of consecutive successful updates. Useful for finding highly stable tracks or identifying those that have just become active. -
consecutive_missed_updates_filter
Filters tracks based on the number of consecutive update cycles in which they were not matched to a detection. This can be used to identify tracks nearing termination. -
status_filter
Filters tracks by their current status. -
location_filter
Filters tracks by spatial location using a geographic bounding box or region specification. Most useful when working withpoint_latitude_longitude
orpoint_utm
tracker kinds.
Otherwise, the get_tracks_for_inference
gets all tracks produced by the object tracking service for a given tracker and inference pair.
from chariot.inference_store import track
from chariot.inference_store import models
tracks = track.filter_tracks(tracker_id=unitless_point_tracker.tracker_id, request_body=models.NewGetTracksRequest(
filters=models.TrackFilterGroup(),
))
tracks = track.get_tracks_for_inference(tracker_id=unitless_point_tracker.tracker_id, inference_id=inference_id)